package _go

import "sort"

func majorityElement(nums []int) int {
	length := len(nums)
	sort.Ints(nums)
	return nums[length/2]
}
